#ifndef GLOBALQUERYHANDLERAO_H
#define GLOBALQUERYHANDLERAO_H
 
#include <e32base.h>  //CActive
#include "GlobalQueryObserver.h"
 
class CGlobalQueryHandlerAO : public CActive
    {
public:
    ~CGlobalQueryHandlerAO();
    static CGlobalQueryHandlerAO* NewL(MGlobalQueryObserver& aObserver);
    static CGlobalQueryHandlerAO* NewLC(MGlobalQueryObserver& aObserver);   
public: 
    void StartHandler();    
    TBool Recycle();
private:    
    CGlobalQueryHandlerAO(MGlobalQueryObserver& aObserver):CActive (EPriorityStandard), iObserver(aObserver){};
    void ConstructL();  
private: // from CActive    
    void RunL();
    void DoCancel();
private: // data
	MGlobalQueryObserver& iObserver;
    };
#endif //GLOBALQUERYHANDLERAO_H
